[fix] [broker] Messages lost on the remote cluster when using topic level replication#22890
Merged
poorbarcode merged 7 commits intoJun 19, 2024
Merged
Conversation
lhotari
reviewed
Jun 11, 2024
lhotari
left a comment
Member
There was a problem hiding this comment.
I added some questions.
Since this issue is related to topic policies, I'd like to bring up to attention also issue #21303. Topic policy mutations aren't thread safe and just wondering if there are cases that could lead to replication clusters being removed if the policies get mutated in a way where replication clusters are lost. Do we have plans to address #21303?
Member
Contributor
Author
nodece
reviewed
Jun 13, 2024
nodece
approved these changes
Jun 13, 2024
69d2abd to
dbf74a6
Compare
Technoboy-
approved these changes
Jun 18, 2024
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 21, 2024
…evel replication (apache#22890) (cherry picked from commit feae589) (cherry picked from commit 3f28fa3)
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 24, 2024
…evel replication (apache#22890) (cherry picked from commit feae589) (cherry picked from commit 3f28fa3)
nikhil-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 25, 2024
…evel replication (apache#22890) (cherry picked from commit feae589) (cherry picked from commit 3f28fa3)
4 tasks
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jul 1, 2024
…evel replication (apache#22890) (cherry picked from commit feae589) (cherry picked from commit 3f28fa3)
nodece
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
Sep 6, 2024
…evel replication (apache#22890) (cherry picked from commit feae589) Signed-off-by: Zixuan Liu <nodeces@gmail.com>
hanmz
pushed a commit
to hanmz/pulsar
that referenced
this pull request
Feb 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Background
PersistentTopic.addReplicationClusterwill remove orphan replication cursors, see [fix][broker] Ignore and remove the replicator cursor when the remote cluster is absent #19972pulsar.repl.<remote cluster>Issue
2was called before topic-level policies initializing, so it will remove the replicator and cursor when a topic is loading up.latest position), and all the messages in backlog are lost.This issue may cause messages to be lost when using topic-level Geo-Replication. For example:
{L1: 0~50000, L2: 0~50000, L3: 0~5000}L1: 10000now.latestposition(L3: 50001)L1: 10001 ~ L3: 50000were lostModifications
Fix the issue: make Mechanism
2being called after the topic-level policies were loaded.Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x